using System;
using System.Collections.Generic;
using System.Text;

namespace Entities
{
    public class LineItemInfo
    {
        // Internal member variables
        private int line;
        private string picture;
        private string id;
        private string productName;
        private decimal price;
        private int quantity;
        private int unitInStock;        

        /// <summary>
        /// Default constructor
        /// This is required by web services serialization mechanism
        /// </summary>
        public LineItemInfo() { }

        /// <summary>
        /// Constructor with specified initial values
        /// </summary>
        /// <param name="id">Item Id</param>
        /// <param name="line">Line number</param>
        /// <param name="qty">Quanity in order</param>
        /// <param name="price">Order item price</param>
        public LineItemInfo(int line, string picture, string id, string name, decimal price, int qty, int unitInStock)
        {
            this.picture = picture;
            this.id = id;
            this.productName = name;
            this.line = line;
            this.price = price;
            this.quantity = qty;
            this.unitInStock = unitInStock;
        }

        #region Properties

        public string Picture
        {
            get { return picture; }
            set { picture = value; }
        }

        public int Line
        {
            get { return line; }
            set { line = value; }
        }

        public string ItemId
        {
            get { return id; }
            set { id = value; }
        }

        public string Name
        {
            get { return productName; }
            set { productName = value; }
        }

        public decimal Price
        {
            get { return price; }
            set { price = value; }
        }

        public int Quantity
        {
            get { return quantity; }
            set { quantity = value; }
        }

        public int UnitInStock
        {
            get { return unitInStock; }
            set { unitInStock = value; }
        }

        public decimal Subtotal
        {
            get { return price * quantity; }
        }

        #endregion
    }
}
